gtkplacessidebar: Don't change location if clicked on eject button
authorCarlos Soriano <carlos.soriano89@gmail.com>
Thu, 9 Oct 2014 18:31:42 +0000 (20:31 +0200)
committerCarlos Soriano <carlos.soriano89@gmail.com>
Fri, 10 Oct 2014 16:17:41 +0000 (18:17 +0200)
Currently we change the current location if we click the eject button of
a mount.

Check whether the user actually clicked the eject button and don't
change location in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=737983

gtk/gtkplacessidebar.c

index 259e5465967c597ad047f53937687617b875decc..3f815f9f5f777e2dbd511253f54ef9e470e52031 100644 (file)
@@ -3442,11 +3442,17 @@ bookmarks_row_activated_cb (GtkWidget         *widget,
 {
   GtkTreeIter iter;
   GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));
+  GtkTreePath  *dummy;
 
   if (!gtk_tree_model_get_iter (model, &iter, path))
     return;
 
-  open_selected_bookmark (sidebar, model, &iter, 0);
+  dummy = NULL;
+  if (!clicked_eject_button (sidebar, &dummy))
+    {
+      open_selected_bookmark (sidebar, model, &iter, 0);
+      gtk_tree_path_free (dummy);
+    }
 }
 
 static gboolean